﻿<phone:PhoneApplicationPage 
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
	xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
	xmlns:local="clr-namespace:Nok_Air"
	mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="800"
	x:Class="Nok_Air.BoardingPassPage"
	Foreground="{StaticResource PhoneForegroundBrush}"
	Orientation="Portrait" FontFamily="/Nok Air;component/Fonts/Fonts.zip#PSL Display" FontSize="40">

	<!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot" Background="Transparent">
        <Grid.Resources>
            <local:NameSeparateConverter x:Name="NameSeparateConverter"/>
            <local:DayConverter4 x:Key="DayConverter4" />
            <local:BarcodeConverter x:Key="BarcodeConverter"/>
        </Grid.Resources>
        <Grid.RowDefinitions>
			<RowDefinition Height="70"/>
			<RowDefinition Height="*"/>
			<RowDefinition Height="80"/>
		</Grid.RowDefinitions>
        <Grid Style="{StaticResource TopAppBarStyle}">
            <Grid.ColumnDefinitions>
                <ColumnDefinition  Width="1*"/>
                <ColumnDefinition  Width="2*"/>
                <ColumnDefinition  Width="1*"/>
            </Grid.ColumnDefinitions>
            <TextBlock x:Name="Title_passenger_TextBlock" Margin="0" TextWrapping="Wrap" Text="{Binding BoardingPassTitle}" FontSize="48" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="White" Grid.Column="1"/>
            <Button x:Name="saveButton" Content="{Binding Save}" Style="{StaticResource BlueButtonStyle}" Click="saveButton_Click" Margin="5,0" Foreground="White" Grid.Column="2" FontSize="40" VerticalAlignment="Center"/>
        </Grid>
        <Grid Style="{StaticResource ContentStyle}" Margin="0">
            <StackPanel>
                <Grid Margin="15,5,15,0">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="2.5*"/>
                        <ColumnDefinition Width="1*"/>
                    </Grid.ColumnDefinitions>
                    <StackPanel>
                        <TextBlock x:Name="headTitleTextBlock" HorizontalAlignment="Left" FontSize="48" Foreground="Black" FontWeight="Bold" TextAlignment="Center" VerticalAlignment="Center" Text="{Binding CheckinTitle}"/>
                        <TextBlock x:Name="successfullyTextBlock" Margin="0" TextWrapping="Wrap" Text="{Binding BoardingPassMsg}" Foreground="Black" FontSize="38" HorizontalAlignment="Left" VerticalAlignment="Center"/>
                    </StackPanel>
                    <Image HorizontalAlignment="Center" Grid.Column="1" VerticalAlignment="Center" Source="/ApplicationIconTile.png"/>
                </Grid>
                <StackPanel Background="White" Margin="15,0,15,0">
                    <StackPanel x:Name="FlightPanel">
                        <StackPanel Orientation="Horizontal" HorizontalAlignment="Left">
                            <TextBlock TextWrapping="Wrap" Text="{Binding Flight}" HorizontalAlignment="Left" Margin="10,0,0,0" Foreground="Black" FontSize="37.333"/>
                            <TextBlock TextWrapping="Wrap" Text="{Binding FlightNo}" HorizontalAlignment="Left" Margin="10,0,0,0" Foreground="Black" FontSize="37.333"/>
                        </StackPanel>
                        <StackPanel HorizontalAlignment="Left" Orientation="Vertical" Margin="20,0,0,0">
                            <StackPanel Orientation="Horizontal">
                                <TextBlock TextWrapping="Wrap" Text="{Binding LDepartFrom}" Foreground="Black" FontSize="37.333"/>
                                <TextBlock TextWrapping="Wrap" Text=" / " Foreground="Black" FontSize="37.333"/>
                                <TextBlock TextWrapping="Wrap" Text="{Binding LArriveTo}" Foreground="Black" FontSize="37.333"/>
                            </StackPanel>
                            <TextBlock TextWrapping="Wrap" Text="{Binding FlightDate, Converter={StaticResource DayConverter4}}" Foreground="Black" FontSize="37.333" Margin="0,-10,0,0"/>
                        </StackPanel>
                    </StackPanel>
                    <StackPanel x:Name="PassengerPanel">
                        <StackPanel Orientation="Horizontal" HorizontalAlignment="Left">
                            <TextBlock TextWrapping="Wrap" Text="{Binding PassengerName}" HorizontalAlignment="Left" Margin="10,0,0,0" Foreground="Black" FontSize="37.333"/>
                            </StackPanel>
                        <StackPanel HorizontalAlignment="Left" Orientation="Vertical" Margin="20,0,0,0">
                            <TextBlock Text="{Binding Name, Converter={StaticResource NameSeparateConverter}}" FontSize="42.667" Foreground="Black"/>
                        </StackPanel>
                        <Grid Margin="20,0">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="*"/>
                                <RowDefinition Height="*"/>
                                <RowDefinition Height="*"/>
                                <RowDefinition Height="*"/>
                            </Grid.RowDefinitions>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="1.5*"/>
                                <ColumnDefinition Width="2*"/>
                            </Grid.ColumnDefinitions>
                            <TextBlock Grid.Row="0" Grid.Column="0" Text="{Binding Class}" d:LayoutOverrides="Width, Height" Foreground="Black" FontSize="34.667" Margin="0,-2,0,0"/>
                            <TextBlock Grid.Row="0" Grid.Column="1" Text="{Binding ClassCode}" d:LayoutOverrides="Width, Height" Foreground="Black" FontSize="34.667" Margin="0,-2,0,0"/>
                            <TextBlock Grid.Row="1" Grid.Column="0" Text="{Binding SeatNoStr}" d:LayoutOverrides="Width, Height" Foreground="Black" FontSize="34.667" Margin="0,-2,0,0"/>
                            <TextBlock Grid.Row="1" Grid.Column="1" Text="{Binding SeatNo}" d:LayoutOverrides="Width, Height" Foreground="Black" FontSize="34.667" Margin="0,-2,0,0"/>
                            <TextBlock Grid.Row="2" Grid.Column="0" Text="{Binding CheckInSeqStr}" d:LayoutOverrides="Width, Height" Foreground="Black" FontSize="34.667" Margin="0,-2,0,0"/>
                            <TextBlock Grid.Row="2" Grid.Column="1" Text="{Binding CheckInSeq}" d:LayoutOverrides="Width, Height" Foreground="Black" FontSize="34.667" Margin="0,-2,0,0"/>
                            <TextBlock Grid.Row="3" Grid.Column="0" Text="{Binding BoardingTimeStr}" d:LayoutOverrides="Width, Height" Foreground="Black" FontSize="34.667" Margin="0,-2,0,0"/>
                            <TextBlock Grid.Row="3" Grid.Column="1" Text="{Binding BoardingTime}" d:LayoutOverrides="Width, Height" Foreground="Black" FontSize="34.667" Margin="0,-2,0,0"/>
                        </Grid>
                       <!-- <Image Source="{Binding Barcode, Converter={StaticResource BarcodeConverter}}" Height="60" Margin="20,0,20,5"/>-->
                       
                        <Image x:Name="BarcodeImg" Source="http://dev.nokair.com:8080/NokCheckinService/images/Barcode/DD7102-6.png" Height="60" Width="380" Margin="20,0,20,5" Stretch="Fill" />
                    </StackPanel>
                </StackPanel>                
            </StackPanel>
        </Grid>
    	<Grid Grid.Row="2">
    		<local:AppBarMenuUserControl/>
    	</Grid>		
		
		

        <!--TitlePanel contains the name of the application and page title-->

        <!--ContentPanel - place additional content here-->
    </Grid>
 
    <!--Sample code showing usage of ApplicationBar-->
    <!--<phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar IsVisible="True" IsMenuEnabled="True">
            <shell:ApplicationBarIconButton IconUri="/Images/appbar_button1.png" Text="Button 1"/>
            <shell:ApplicationBarIconButton IconUri="/Images/appbar_button2.png" Text="Button 2"/>
            <shell:ApplicationBar.MenuItems>
                <shell:ApplicationBarMenuItem Text="MenuItem 1"/>
                <shell:ApplicationBarMenuItem Text="MenuItem 2"/>
            </shell:ApplicationBar.MenuItems>
        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>-->

</phone:PhoneApplicationPage>
